<?php
header('Content-type:text/html;charset=utf-8');

//包含数据库配置
include '../../public/peizhi.php';

//包含函数
include '../../public/func.php';

//调用函数
$link = db();

//接表单传值
$fq_id = $_POST['fq_id'];
$fq_name = $_POST['fq_name'];

//准备SQL语句
$sql = "update fenqu set fq_name='{$fq_name}' where id='{$fq_id}'";

//判断并执行SQL语句
if($res = mysqli_query($link,$sql)){
	echo '<script>alert("修改分区成功");window.location.href="show.php";</script>';
}else{
	echo '<script>alert("修改分区失败");window.location.href="show.php";</script>';
}

//关闭数据库连接
mysqli_close($link);

